{% extends "master.html" %}
{% block subtitle %} - 基础信息 - 供应商管理{% endblock %}


{% block main %}
<div class="container">
    <div class="row">
        <ul class="breadcrumb">
          <li><a href="{{url_for('bpMas.view')}}">基础信息</a> <span class="divider">\</span></li>
          <li class="active">供应商管理</li>
        </ul>
    </div>
    
    <div class="row">     
        {{mymacros.render_search_form(form,3)}}
    </div>
        
    <div class="row">   
        <div class="btn-toolbar pull-right">
            <div class="btn-group"><button type="button" class="btn" onclick="$('form').submit()">{{BTN_SEARCH}}</button></div>
            {% if getAllPermission(['SUPPLIER_CREATE',]) %}
                <div class="btn-group"><a href="{{url_for('bpSpl.view',action='add')}}" class="btn btn-primary">创建供应商</a></div>
            {% endif %}
        </div>
    </div>
    
    <div class="row">
        <table class="table table-bordered">
            <thead>
                <tr>
                    <td>系统编号</td>
                    <td>供应商名称</td>
                    <td>地址</td>
                    <td>联系人</td>
                    <td>电话</td>
                    <td>手机</td>
                    <td>创建人</td>
                    <td>创建时间</td>
                </tr>
            </thead>
            <tbody>
                {% for r in result.items %}
                    <tr>
                        <td><a href="{{url_for('bpSpl.view',action='view',id=r.id)}}">{{r.no}}</a></td>
                        <td>{{r.name}}</td>
                        <td>{{r.province|f}}{{r.city|f}}{{r.address|f}}</td>
                        <td>{{r.att|f}}</td>
                        <td>{{r.tel|f}}</td>
                        <td>{{r.mobile|f}}</td>
                        <td>{{r.createBy|f}}</td>
                        <td>{{r.createTime|ft}}</td>
                    </tr>
                {% endfor %}
            <tbody>
        </table>
        {{mymacros.mypaginate(result)}}
    </div>
</div>
{% endblock %}